using System;
using LF.Domain.Entities;

namespace LF.Domain.Services
{
    public interface IParamConfigManagerService
    {
        /// <summary>
        /// 根据ID获取参数配置
        /// </summary>
        /// <param name="id">参数配置ID</param>
        /// <returns>参数配置实体</returns>
        ParamConfig Get(Guid id);
        
        /// <summary>
        /// 分页获取参数配置列表
        /// </summary>
        /// <param name="index">页码</param>
        /// <param name="size">每页大小</param>
        /// <param name="name">参数名称(可选)</param>
        /// <param name="key">参数键名(可选)</param>
        /// <returns>参数配置列表</returns>
        List<ParamConfig> All(int index, int size, string name = null, string key = null);
        
        /// <summary>
        /// 获取参数配置总数
        /// </summary>
        /// <param name="name">参数名称(可选)</param>
        /// <param name="key">参数键名(可选)</param>
        /// <returns>总数</returns>
        long Count(string name = null, string key = null);
        
        /// <summary>
        /// 添加参数配置
        /// </summary>
        /// <param name="config">参数配置实体</param>
        /// <returns>成功与否</returns>
        bool Insert(ParamConfig config);
        
        /// <summary>
        /// 更新参数配置
        /// </summary>
        /// <param name="config">参数配置实体</param>
        /// <returns>成功与否</returns>
        bool Update(ParamConfig config);
        
        /// <summary>
        /// 删除参数配置
        /// </summary>
        /// <param name="id">参数配置ID</param>
        /// <returns>成功与否</returns>
        bool Delete(Guid id);

        /// <summary>
        /// 根据键名获取参数配置
        /// </summary>
        /// <param name="key">键名</param>
        /// <returns>参数配置实体</returns>
        ParamConfig GetByKey(string key);

        /// <summary>
        /// 初始化默认参数配置
        /// </summary>
        void InitializeDefaultParams();
    }
} 